﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.Serialization.FormerlySerializedAsAttribute
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System;
using UnityEngine.Scripting;

#nullable disable
namespace UnityEngine.Serialization
{
  /// <summary>
  ///   <para>Use this attribute to rename a field without losing its serialized value.</para>
  /// </summary>
  [RequiredByNativeCode]
  [AttributeUsage(AttributeTargets.Field, AllowMultiple = true, Inherited = false)]
  public class FormerlySerializedAsAttribute : Attribute
  {
    private string m_oldName;

    /// <summary>
    ///   <para></para>
    /// </summary>
    /// <param name="oldName">The name of the field before renaming.</param>
    public FormerlySerializedAsAttribute(string oldName) => this.m_oldName = oldName;

    /// <summary>
    ///   <para>The name of the field before the rename.</para>
    /// </summary>
    public string oldName => this.m_oldName;
  }
}
